using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for PHIEUTHU.
     /// </summary>
     public class PHIEUTHU
    {
              private Int32 _MAPHIEUTHU;
      private string _MAHOADONTHU;
      private string _MAHOADONXUATKHO;
      private decimal _TIENTHANHTOAN;
      private string _DIENGIAI;
      private Int32 _MACA;
      private DateTime _NGAYTHANHTOAN;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAPHIEUTHUNullable
      { get { return false;  } }
      public Int32 MAPHIEUTHU
      {
         get { return _MAPHIEUTHU; }
         set { _MAPHIEUTHU = value; }
      }
      public bool IsMAHOADONTHUNullable
      { get { return true;  } }
      public string MAHOADONTHU
      {
         get { return _MAHOADONTHU;  }
         set { _MAHOADONTHU = value; }
      }
      public bool IsMAHOADONXUATKHONullable
      { get { return true;  } }
      public string MAHOADONXUATKHO
      {
         get { return _MAHOADONXUATKHO;  }
         set { _MAHOADONXUATKHO = value; }
      }
      public bool IsTIENTHANHTOANNullable
      { get { return true;  } }
      public decimal TIENTHANHTOAN
      {
         get { return _TIENTHANHTOAN;  }
         set { _TIENTHANHTOAN = value; }
      }
      public bool IsDIENGIAINullable
      { get { return true;  } }
      public string DIENGIAI
      {
         get { return _DIENGIAI;  }
         set { _DIENGIAI = value; }
      }
      public bool IsMACANullable
      { get { return true;  } }
      public Int32 MACA
      {
         get { return _MACA;  }
         set { _MACA = value; }
      }
      public bool IsNGAYTHANHTOANNullable
      { get { return true;  } }
      public DateTime NGAYTHANHTOAN
      {
         get { return _NGAYTHANHTOAN;  }
         set { _NGAYTHANHTOAN = value; }
      }

        #endregion

        #region Constructors
        public PHIEUTHU()
        {
            Reset();
        }
        public PHIEUTHU(PHIEUTHU obj)
        {
            	this._MAPHIEUTHU = obj.MAPHIEUTHU;
	this._MAHOADONTHU = obj.MAHOADONTHU;
	this._MAHOADONXUATKHO = obj.MAHOADONXUATKHO;
	this._TIENTHANHTOAN = obj.TIENTHANHTOAN;
	this._DIENGIAI = obj.DIENGIAI;
	this._MACA = obj.MACA;
	this._NGAYTHANHTOAN = obj.NGAYTHANHTOAN;
        }
        #endregion

        public void Reset()
        {
                     _MAPHIEUTHU = EmptyValues.v_Int32;
         _MAHOADONTHU = EmptyValues.v_string;
         _MAHOADONXUATKHO = EmptyValues.v_string;
         _TIENTHANHTOAN = EmptyValues.v_decimal;
         _DIENGIAI = EmptyValues.v_string;
         _MACA = EmptyValues.v_Int32;
         _NGAYTHANHTOAN = EmptyValues.v_DateTime;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAPHIEUTHU"] is DBNull))
		{
			obj.MAPHIEUTHU = (Int32)reader["MAPHIEUTHU"];
		}
                if(!(reader["MAHOADONTHU"] is DBNull))
		{
			obj.MAHOADONTHU = (string)reader["MAHOADONTHU"];
		}
                if(!(reader["MAHOADONXUATKHO"] is DBNull))
		{
			obj.MAHOADONXUATKHO = (string)reader["MAHOADONXUATKHO"];
		}
                if(!(reader["TIENTHANHTOAN"] is DBNull))
		{
			obj.TIENTHANHTOAN = (decimal)reader["TIENTHANHTOAN"];
		}
                if(!(reader["DIENGIAI"] is DBNull))
		{
			obj.DIENGIAI = (string)reader["DIENGIAI"];
		}
                if(!(reader["MACA"] is DBNull))
		{
			obj.MACA = (Int32)reader["MACA"];
		}
                if(!(reader["NGAYTHANHTOAN"] is DBNull))
		{
			obj.NGAYTHANHTOAN = (DateTime)reader["NGAYTHANHTOAN"];
		}
//            _MAPHIEUTHU = (reader["MAPHIEUTHU"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAPHIEUTHU"];
//            _MAHOADONTHU = (reader["MAHOADONTHU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADONTHU"];
//            _MAHOADONXUATKHO = (reader["MAHOADONXUATKHO"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADONXUATKHO"];
//            _TIENTHANHTOAN = (reader["TIENTHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TIENTHANHTOAN"];
//            _DIENGIAI = (reader["DIENGIAI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIENGIAI"];
//            _MACA = (reader["MACA"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MACA"];
//            _NGAYTHANHTOAN = (reader["NGAYTHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYTHANHTOAN"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MAPHIEUTHU, string MAHOADONTHU, string MAHOADONXUATKHO, decimal TIENTHANHTOAN, string DIENGIAI, Int32 MACA, DateTime NGAYTHANHTOAN)
        {
                     this._MAPHIEUTHU = MAPHIEUTHU;
         this._MAHOADONTHU = MAHOADONTHU;
         this._MAHOADONXUATKHO = MAHOADONXUATKHO;
         this._TIENTHANHTOAN = TIENTHANHTOAN;
         this._DIENGIAI = DIENGIAI;
         this._MACA = MACA;
         this._NGAYTHANHTOAN = NGAYTHANHTOAN;
        }
    }
}